package cn.tedu.bonfire.passport.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class UserPhoneLoginParam implements Serializable {

    /**
     * 电话号码
     */
    @NotNull(message = "手机号不能为空")
    @Pattern(regexp = "^\\d{11}$",
            message = "手机号码必须是11位的纯数字")
    @ApiModelProperty(value = "手机号码", required = true, example = "13800138008")
    private String phone;

    /**
     * 验证码
     */
    @NotNull(message = "验证码不能为空")
    @Pattern(regexp = "^\\d{4}$",
            message = "验证码必须是4位的纯数字")
    private String captcha;

}
